package com.sugar.queryinfo.module.business.api.bi.dto.req.common;

import cn.hutool.core.util.StrUtil;
import com.sugar.queryinfo.module.business.api.bi.core.BackInvestBasicApi;
import com.sugar.queryinfo.module.business.api.bi.core.dto.ApiReqVO;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 身份三要素认证 请求体
 */
@Data
public class UserThreeInfoReqVO extends UserTwoInfoReqVO {

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    private String phone;

    @Override
    public void encrypt() {
        super.encrypt();
        if (StrUtil.isNotBlank(phone)) {
            this.phone = BackInvestBasicApi.encrypt(this.phone);
        }
    }
}
